//
//  CategoryViewController.m
//  AppMua5
//
//  Created by duong nguyen on 9/13/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "CategoryViewController.h"

@interface CategoryViewController ()

@end

@implementation CategoryViewController
@synthesize viewApi,headerBelowView;


-(id) init{
    [super init];
    self.viewApi=[[ViewApi alloc]init];
    self.headerBelowView=[[UIView alloc]init];
    return self;
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

-(void) initCategoryView{
    // Get custom header below
    [viewApi getHeaderBelowView:self.headerBelowView];
    [self.view addSubview:self.headerBelowView];
}

-(void)loadView{
    [super loadView];
    [self initCategoryView];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
}

-(void) viewDidAppear:(BOOL)animated{
    [viewApi getCustomNavigationBarFrame:self.navigationController.navigationBar];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
	return YES;
}

@end
